<template lang="jade">
  div
    div.weui_cells_title Program名字
    div.weui_cell
      input.weui_input(placeHolder="请输入Program名字", v-model="program.name")

    div.weui_cells_title 复制于
    div.weui_cell.weui_cell_select
      div.weui_cell_bd.weui_cell_primary
        select.weui_select(v-model="baseProgramId")
          option(v-for="program in programs", :value="program.id") {{program.name}}

    div.weui_cells_title Program简述
    div.weui_cell
      div.weui_cell_bd.weui_cell_primary
        textarea.weui_textarea(placeHolder="请输入Program简述", rows="3", v-model="program.description")
</template>
<script>
import {mapState, mapMutations} from 'vuex'

export default {
  methods: {},
  computed: {
    ...mapState(['programs', 'program']),
    baseProgramId: {
      get: function() {
        return this.$store.state.baseProgramId
      },
      set: function(val, oldVal) {
        this.$store.commit('UPDATE', {
          key: 'baseProgramId',
          value: val
        })
      }
    }
  },
  props: [],
  watch: {},
  components: { },
  events: {},
  data() {
    return {
    }
  },
  mounted() {}
}
</script>
<style scoped>

</style>
